package com.example.layouttext628cxy;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import static com.example.layouttext628cxy.R.id.editText2;
import static com.example.layouttext628cxy.R.id.editText5;
import static com.example.layouttext628cxy.R.id.editText6;

/**
 * Created by 陈向阳 on 2017/5/25.
 */

public class RelativeLayout extends AppCompatActivity implements View.OnClickListener {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.relativelayout);
        Button button5 = (Button) findViewById(R.id.button5);
        button5.setOnClickListener(this);
    }

    public void onClick(View v) {
        switch (v.getId()) {

            case R.id.button5:
                Intent intent=new Intent(RelativeLayout.this,MainActivity.class);
                startActivity(intent);
                break;


        }


    }

}
